package com.example.gongj;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

/**
 * 字符缓存输出流
 */
public class BufferedWriterDemo {
    public static void main(String[] args) throws IOException {
        FileWriter fw = new FileWriter("IO流\\f.txt");
        BufferedWriter bw = new BufferedWriter(fw);
        for (int i = 0; i < 10; i++) {
            bw.write("你好棒哦");
            //换行
            bw.newLine();
        }
        bw.flush();
        bw.close();
    }
}
